1. Field of the Invention
This invention relates to computer systems, and more particularly, to methods and apparatus for accelerating the rendering of images to be reproduced on a computer output display.
2. History of the Prior Art
In three dimensional graphics, a picture is created on a display by scanning rows of pixels in sequence to paint a frame on the display. The pictures are made to change by following one frame by a next frame at a rate of approximately thirty frames per second. Each of these frames which appears on the display is defined by pixel data stored in frame buffer memory, typically local memory which is part of a graphics input/output circuit.
The pixel data is stored in the frame buffer at a position which controls where the pixel will appear when displayed. The pixel data is conventionally data defining the amount of each of three red, green, and blue colors that define the particular pixel. In a three dimensional display, the pixel data also includes data which allows the depth of the pixel to be determined with respect to a preceding pixel at the same point in the frame buffer.
An application program typically prepares the data to be sent to the frame buffer by defining the vertices of triangular or other polygonal areas which are graphically similar. This allows a great number of pixels to be represented by a minimal amount of pixel data. In three dimensional graphics, each vertex is described by its position in the frame, its depth, red/green/blue color values, and its position on a texture map which varies the color across the triangle. Various other data may also be included such as data to indicate how the triangle is to be treated with respect to the pixel data which already resides in the frame buffer for the same positions.
Since only the data defining the three vertices is provided by an application program, this data must be utilized to derive the position in the frame. Normally, the x and y values of the three vertices are defined by an application in screen space while the depth, the red/green/blue color values, and texture coordinates of each pixel in the triangle are defined in world space. The screen space values of the x and y coordinates of the vertices allow the positions of all pixels in a polygon to be obtained by linearly interpolating between the vertex values. The values of the other attributes at each pixel determined to lie within a polygon, however, must be converted from the world space in which they are furnished to screen space. Color values, depth, and texture coordinates are all linear in world space so a process involving linear interpolation and perspective transformation may be used to determine the color values, depth, and texture coordinates of each pixel. This is a complicated and computationally intense procedure.
After these attributes have been obtained for each pixel, the texture coordinates must be utilized to determine a texture value for each pixel in a texture map. A texture map is a matrix of values each defining a particular single color which is applied to vary color values of a pixel. Often a pixel, in fact, covers space on a texture map which involves several texture values. Consequently, in accurate texture mapping, obtaining final texture values is also a computationally intense procedure which greatly slows the graphics rendering process.
Once the texture values and other attributes of each pixel have been determined, they are used to define the r/g/b colors of each pixel. When the individual pixels are ready to write to the frame buffer, it is necessary to determine the manner in which each pixel is to be written to the frame buffer. This is typically determined from control data included with each pixel which determines the raster operation which is to take place. In many cases, a new pixel to be displayed depends both on the new pixel values and the values of the pixel held in the frame buffer; and the pixel data includes the control data to define this dependency. In general, the data of the pixel in the frame buffer must be read, combined with the new pixel data in the manner described by the new pixel control data, and written back to the frame buffer before a new pixel can be displayed.
With modern graphics displays which typically provide a depth value and five or eight bits of pixel color data for each of the three colors, a very large amount of pixel data must be read, manipulated, and written back to the frame buffer in a very short time. Prior art arrangements have been unable to accomplish these operations rapidly enough so that frames are not dropped when attempting to display rapidly changing graphics data.
It is desirable to increase the speed at which pixel data may be written to the frame buffer in a modem computer graphics display.